package com.itheima.bos.service.take_delivery;


import java.util.Date;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import com.itheima.bos.domain.page.PageBean;
import com.itheima.bos.domain.take_delivery.Promotion;

public interface IPromotionService {

	// 添加宣传任务
	void save(Promotion model);

	// 分页查询宣传任务，后台
	Page<Promotion> pageQuery(Pageable pageable);

	// 分页查询宣传任务，前台
	@Path("/pageQuery")
	@GET
	@Produces({ "application/xml", "application/json" })
	public PageBean<Promotion> findPageData(@QueryParam("page") int page,
			@QueryParam("rows") int rows);

	// 根据id查询宣传内容
	@Path("/promotion/{id}")
	@GET
	@Produces({ "application/xml", "application/json" })
	public Promotion findById(@PathParam("id") Integer id);

	void updateStatus(Date date);
}
